'use strict';

const Controller = require('egg').Controller;

class HomeController extends Controller {
  async index() {
    const { ctx } = this;
    const user = await ctx.service.home.find(ctx.query.id);
    ctx.body = user;
  }
  async userList() {
    const users = await this.ctx.service.home.findAll();
    this.ctx.body = users;
  }
}

module.exports = HomeController;
